package com.hc.weatherhc.service;

import com.hc.weatherhc.dao.CityRepository;
import com.hc.weatherhc.domain.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityService {
    @Autowired
    CityRepository cityRepository;

    //获取所有城市列表数据
    public List<City> cityList(){
        return cityRepository.findAll();
    }
}
